package com.byesame.demo01.entity;

import java.util.Date;
import java.util.List;

public class ProjectClassEntity extends BaseEntity {
    // 这里的属性要和数据库表字段一一对应,命名形式小驼峰
    private Long id;

    private String name;
    private String className;

    private Integer stuCount;

    private List<StudentEntity> stuList;

    private long createUserId;

    private String createBy;

    private Date createDate;

    private long updateUserId;

    private String updateBy;

    private Date updateDate;
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public Integer getStuCount() {
        return stuCount;
    }

    public void setStuCount(Integer stuCount) {
        this.stuCount = stuCount;
    }

    public List<StudentEntity> getStuList() {
        return stuList;
    }

    public void setStuList(List<StudentEntity> stuList) {
        this.stuList = stuList;
    }

    public long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(long createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
//        return String.format("ProjectClass { id: %d, name: '%s', stuCount: '%s'}", id, name, stuCount);
        return String.format("{ id: %d, name: '%s', className: '%s', stuCount: %d, stuList: '%s'}",
                this.getId(),
                this.getName(),
                this.getClassName(),
                this.getStuCount(),
                this.getStuList()
        );
    }
}
